home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / adatutor / simlatrs / ssi_test.a < prev    next >
Text File  |  1996-01-30  |  1KB  |  41 lines

  1. with Spacecraft_Sensor_Interface; use Spacecraft_Sensor_Interface;
  2. with Console;
  3. procedure SSI_Test is
  4.  
  5.   procedure Display is
  6.     P : PRESSURE;
  7.     T : TEMPERATURE;
  8.     R : RADIATION_LEVEL;
  9.   begin
  10.     Update;
  11.     for I in SPACECRAFT_SECTION loop
  12.       Console.Put("     ");
  13.       case I is
  14.         when BRIDGE           => Console.Put("Bridge            ");
  15.         when AUXILIARY_BRIDGE => Console.Put("Auxiliary Bridge  ");
  16.         when CREW_QUARTERS    => Console.Put("Crew Quarters     ");
  17.         when GALLEY           => Console.Put("Galley            ");
  18.         when LAB1             => Console.Put("Lab 1             ");
  19.         when LAB2             => Console.Put("Lab 2             ");
  20.         when LAB3             => Console.Put("Lab 3             ");
  21.         when AIRLOCK1         => Console.Put("Air Lock 1        ");
  22.         when AIRLOCK2         => Console.Put("Air Lock 2        ");
  23.         when EXPERIMENT_BAY   => Console.Put("Experiment Bay    ");
  24.       end case;
  25.       P := Sensed_Value(I);
  26.       T := Sensed_Value(I);
  27.       R := Sensed_Value(I);
  28.       Console.Put(FLOAT(P), 5, 1);
  29.       Console.Put(FLOAT(T), 5, 1);
  30.       Console.Put(FLOAT(R), 5, 1);
  31.       Console.New_Line;
  32.     end loop;
  33.   end Display;
  34.  
  35. begin
  36.   for I in 1..40 loop
  37.     Console.Put_Line("Event");
  38.     Display;
  39.   end loop;
  40. end SSI_Test;
  41.